$(function () {
    $('.selector-wrap').hover(function (event) {
        console.log(event)
        if (event.type == 'mouseenter') {
            $('.selector-wrap ul').css('visibility', 'visible')
            console.log($('.selector-wrap ul'))
        } else if (event.type == 'mouseleave') {
            $('.selector-wrap ul').css('visibility', 'hidden')
        }
    })

    $('.tab').on('click', function (e) {
        $(e.currentTarget).addClass('active').siblings().removeClass('active')
        $('.articles').eq($(e.currentTarget).index()).addClass('active').siblings().removeClass('active')
    })
})